<?php

/**
 * FormaPago form base class.
 *
 * @method FormaPago getObject() Returns the current form's model object
 *
 * @package    sf_sandbox
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseFormaPagoForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'     => new sfWidgetFormInputHidden(),
      'tipo'   => new sfWidgetFormChoice(array('choices' => array('EFECTIVO' => 'EFECTIVO', 'TARJETA' => 'TARJETA', 'CHEQUE PROPIO' => 'CHEQUE PROPIO', 'CHEQUE TERCERO' => 'CHEQUE TERCERO', 'CTA CTE' => 'CTA CTE', 'METAL' => 'METAL', 'TRANSFERENCIA' => 'TRANSFERENCIA', 'VALE' => 'VALE'))),
      'nombre' => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'     => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'tipo'   => new sfValidatorChoice(array('choices' => array(0 => 'EFECTIVO', 1 => 'TARJETA', 2 => 'CHEQUE PROPIO', 3 => 'CHEQUE TERCERO', 4 => 'CTA CTE', 5 => 'METAL', 6 => 'TRANSFERENCIA', 7 => 'VALE'), 'required' => false)),
      'nombre' => new sfValidatorString(array('max_length' => 60)),
    ));

    $this->widgetSchema->setNameFormat('forma_pago[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'FormaPago';
  }

}
